<template>
  <div>
    <div>内容  <input v-model="content"/></div>
    <button @click="send">发送给另一个组件</button>
    <div>内容2 <input v-model="msg" /></div>
    <button @click="send2">发送给另一个</button>
  </div>
</template>

<script>
import  {info} from "@/bus/event"
import  {bus} from  "@/bus";
export default {
    data(){
        return  {
            content:""
        }
    },
    methods:{
        send(){
            // alert(this.content);
            info.$emit("sendValue",this.content);
        },
        send2(){
            bus.$emit("sendMsg",this.msg);
        }
    }


}
</script>

<style>

</style>